<div class="row">
    <div class="col-md-12">
        <!-- Custom Tabs -->
        <div class="nav-tabs-custom">
            <ul class="nav nav-tabs">
                <li class="<?php echo $tab == 'csv' ? 'active' : '' ?>" ><a href="#tab_1" data-toggle="tab">From CSV</a></li>
                <li class="<?php echo $tab == 'ftp' ? 'active' : '' ?>"><a href="#tab_2" data-toggle="tab">From FTP</a></li>
                <li class="pull-right">&nbsp;</li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane <?php echo $tab == 'csv' ? 'active' : '' ?>" id="tab_1">
                    <div class="box box-solid">
                        <div class="box-body">
                            <?php echo $this->Form->create('csv', array('url' => array('controller' => 'video', 'action' => 'bulkupload/csv'))); ?>
                            <div class="form-group">
                                <?php echo $this->Form->file('file',array('multiple'=>false,'name'=>'data[csv][]','style'=>'display:none;','accept'=>'.csv')); ?>
                                <button id="chooseFile" class="btn btn-default btn-sm">Choose CSV</button>
                            </div>
                            <?php echo $this->Form->end() ?>
                        </div><!-- /.box-body -->
                        <div class="box-footer">
                            <button type="submit" class="btn btn-primary btn-sm">Upload</button>
                            <button type="submit" class="btn btn-sm">Download Sample File</button>
                        </div>
                    </div><!-- /.box -->
                </div>
                <div class="tab-pane <?php echo $tab == 'ftp' ? 'active' : '' ?>" id="tab_2">
                    <?php echo $this->Form->create('ftp', array('url' => array('controller' => 'video', 'action' => 'bulkupload/ftp'))); ?>
                    <div class="box box-solid">
                        <div class="box-body">
                            <div class="form-group">
                                <div class="row">
                                    <div class="col-xs-3">
                                        <?php echo $this->Form->input('host',array('class'=>'form-control','placeholder'=>'Host','label'=>false)); ?>
                                    </div>
                                    <div class="col-xs-3">
                                        <?php echo $this->Form->input('username',array('class'=>'form-control','placeholder'=>'Username','label'=>false)); ?>
                                    </div>
                                    <div class="col-xs-3">
                                        <?php echo $this->Form->input('password',array('class'=>'form-control','placeholder'=>'Password','label'=>false,'type'=>'password')); ?>
                                    </div>
                                    <div class="col-xs-1">
                                        <?php echo $this->Form->input('port',array('class'=>'form-control','placeholder'=>'Port','label'=>false)); ?>
                                    </div>
                                    <div class="col-xs-1">
                                        <button class="btn btn-success btn-sm">Connect</button>
                                    </div>
                                    <div class="col-xs-1">
                                        <div class="loader"></div>
                                    </div>
                                </div>
                            </div>
                        </div><!-- /.box-body -->
                    </div><!-- /.box -->
                    
                    <div class="box box-solid hide" id="ftpdownloadcontainer">
                        <div class="box-body no-padding">
                        <table class="table" id="ftpdownloaddataprocess">
                            <tbody>
                                <tr>
                                    <th style="width: 40%">Source</th>
                                    <th style="width: 10%">Size</th>
                                    <th style="width: 10%">Type</th>
                                    <th style="width: 35%">Progress</th>
                                    <th style="width: 5%">&nbsp;</th>
                                </tr>
                                <tr>
                                    <td>file:///var/www/newsnation/assests/abp.mp4</td>
                                    <td>200 MB</td>
                                    <td>Mp4</td>
                                    <td>
                                        <div class="progress sm" style="margin-top:7px">
                                            <div style="width: 55%" class="progress-bar progress-bar-danger"></div>
                                        </div>
                                    </td>
                                    <td><span class="badge bg-red">55%</span></td>
                                </tr>       
                            </tbody>
                        </table> 
                            
                        </div><!-- /.box-body -->
                    </div><!-- /.box -->
                    
                    <div class="box box-solid hide" id="ftpcontainer">
                        <div class="box-body">
                            <div class="form-group">
                                <div class="row">
                                    <div class="col-xs-12">
                                        <label>Path</label>
                                        <?php echo $this->Form->input('path',array('class'=>'form-control','placeholder'=>'Path','label'=>false,'value'=>'/','readonly'=>'readonly')); ?>
                                    </div>  
                                </div>
                            </div>
                            <div id="ftpdata" style="overflow: auto; height: 270px;"></div>
                        </div><!-- /.box-body -->
                        <div class="box-footer clearfix">
                            <div class="pull-right">
                                <button type="button" id="ftpreset" class="btn btn-primary btn-sm">Reset</button>
                                <button type="button" id="ftpdownload" class="btn btn-primary btn-sm">Download</button>
                            </div>
                        </div><!-- box-footer -->
                    </div><!-- /.box -->
                    <?php echo $this->Form->end() ?>
                </div>
            </div><!-- /.tab-content -->
        </div><!-- nav-tabs-custom -->
    </div><!-- /.col -->
</div> <!-- /.row -->

<script src="<?php echo Router::url('/', true); ?>js/jquery.csv.js"></script>